gdkwindow: Remove O(n-children) code in gdk_window_invalidate
authorAlexander Larsson <alexl@redhat.com>
Thu, 31 Mar 2016 16:56:18 +0000 (18:56 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 31 Mar 2016 16:56:18 +0000 (18:56 +0200)
commit4c10800bcc11d81a503255d6c6fa90405badd3ce
tree6623d7b546f2e6bff2fe47b0b3c0a8999bb41ef1
parentd1acb786a7436743697f7aede31d7e72dec1ffe7
gdkwindow: Remove O(n-children) code in gdk_window_invalidate

When we invalidate a window we need to also invalidate all child windows
that are native (non-native are automatically invalidated as we track
invalidation once per native window only). This was done in a pretty
inefficient way, recursing over the entire tree.

This makes the invalidation much faster by only looking at the native
children of the native window we're in, filtering out those that
are not a descendant of the client side window we're interested in.
Given that there are very few native subwindows this is much faster.
gdk/gdkwindow.c